import request from '@/utils/request';
/***********  通用  *************/
// 查询组织
export function commonOrg() {
  return request({
    url: '/common/queryOrg',
    method: 'POST'
  });
}

// 查询车间
export function commonCj() {
  return request({
    url: '/common/queryCj',
    method: 'POST'
  });
}

// 查询工序
export function commonGx() {
  return request({
    url: '/common/queryGongXu',
    method: 'POST'
  });
}
// 查询参数
export function commonParam(query) {
  return request({
    url: '/common/queryParam',
    method: 'POST',
    data: query
  });
}
// 查询设备
export function commonEquip(query) {
  return request({
    url: '/common/queryEquipment',
    method: 'POST',
    data: query
  });
}
// 查询品种
export function commonPz(gongxu) {
  return request({
    url: '/common/queryPzByGongXu',
    method: 'GET',
    params: { gongxu: gongxu }
  });
}
// 获取所有设备类型
export function getAllEquipment() {
  return request({
    url: '/api-gyd/getAllEquipment',
    method: 'POST'
  });
}

// 获取字典通用接口
export function getSysDict(type) {
  return request({
    url: '/common/queryDataDictionaryList',
    method: 'POST',
    data: { dic_bh: type }
  });
}
// 获取字典通用接口
export function getSysDictByName(type) {
  return request({
    url: '/dataDictionary/queryDataDictionary',
    method: 'POST',
    data: { name: type, size: -1 }
  });
}
// 获取参数
export function getParams1(query) {
  return request({
    url: '/monitor/getRealTimeDataOfDictionariesOne',
    method: 'POST',
    data: query
  });
}
export function getParams2(query) {
  return request({
    url: '/monitor/getRealTimeDataOfDictionariesTwo',
    method: 'POST',
    data: query
  });
}
// 上传图片
export function uploadIMG(query) {
  return request({
    url: '/common/uploadImage',
    method: 'POST',
    data: query
  });
}
